<template>
  <div>
      <el-dropdown v-bind="$attrs">
        {{fieldValue}} 
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>黄金糕</el-dropdown-item>
          <el-dropdown-item>狮子头</el-dropdown-item>
          <el-dropdown-item>螺蛳粉</el-dropdown-item>
          <el-dropdown-item>双皮奶</el-dropdown-item>
          <el-dropdown-item>蚵仔煎</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
  </div>

</template>

<script>
export default {
  props: {
    value: {
      type: String,
      default() {
        return ""
      }
    },
  },
  computed: {
    fieldValue: {
      get() {
        // console.log(this.$attrs,this.children,'--------------')
        return this.value || "操作"
      },
      set(val) {
        this.$emit('input', val)
      }
    }
  }
}
</script>


